package com.ayuan.blog.common.wechat.user;

import com.ayuan.blog.common.wechat.common.WeChatBaseUtil;
import com.ayuan.blog.common.wechat.user.bean.WeChatUserInfo;

/**
 * Created by xiaozhu on 16/5/10.
 */
public class WeChatUserClient {

    private static final String USER_INFO_URL = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=%s&openid=%s&lang=zh_CN";

    public static WeChatUserInfo userInfo(String token, String openId) {
        return WeChatBaseUtil.sendWeChatHTTPRequest(token, null, String.format(USER_INFO_URL, "%s", openId), WeChatUserInfo.class);
    }
}
